define(function (require, exports, module) {
    'use strict';

    function ctrl($scope,$state,$stateParams,$filter,$ionicHistory,CommonService,InfoService,HistoryNavChartService,
                  $ionicScrollDelegate,$ionicLoading) {
        var par = $scope.param = new Array();

        $scope.$on('$ionicView.beforeEnter', function() {
            par.prod_id = $stateParams['id'];
            init();
        });


        function init(){
            return InfoService.getProdRate(par.prod_id).then(function(data) {
                if (data) {
                    $scope.fund=data;
                }
            })
        }

    }

    ctrl.$inject = ['$scope','$state','$stateParams','$filter','$ionicHistory','CommonService','InfoService','HistoryNavChartService',
        '$ionicScrollDelegate','$ionicLoading'];
    return ctrl;
});